package com.hjx.response;

/**
 * <p>Title:</p>
 * <p>Description:</p>
 *
 * @author hjx
 * @date 2020/6/9 - 20:14
 */
public enum ResponseType {
    OPERATION_SUCCESS(0,"操作成功"),
    OPERATION_FAILED(1,"操作失败"),
    QUERY_SUCCESS(0,"查询成功"),
    QUERY_FAILED(1,"查询失败"),
    ACCEPT_APPLY(0,"审核通过"),
    WAIT_APPLY(1,"等待审核"),
    REFUSE_APPLY(-1,"审核不通过"),
    AUTH_FORBIDDEN(1,"没有访问权限"),
    LOGIN_SUCCESS(0,"登陆成功"),
    LOGIN_FAILED(1,"登录失败"),
    USERNAME_OR_PASSWORD_ERROR(1,"用户名或密码错误"),
    USERNAME_OR_PASSWORD_IS_NULL(1,"用户名或密码为空"),
    SERVICE_IS_BUSY(-1,"服务器繁忙"),
    UNKNOWN_ERROR(-1,"未知错误");

    private int status;
    private String message;
    ResponseType(int status, String message){
        this.status = status;
        this.message = message;
    }

    public int getStatus() {
        return status;
    }

    public String getMessage() {
        return message;
    }
}
